<#-- 资源链接 -->
<#macro resource relativeUrl>
	<@spring.url "/resources/"+relativeUrl />
</#macro>

<#----------------------标签模板-------------------------->

<#-- label 标签 -->
<#macro label name text>
    <td>
    	<label>${text}：</lable>
    </td>
</#macro>
<#-- input标签 -->
<#macro input name value class placeholder width size maxlength readOnly=false>
	<td>
		<input type="text" name="${name}" value="${value}" class="${class}"  placeholder="${placeholder}" size="${size}" maxlength="${maxlength}" <#if readOnly==true>readOnly</#if>/>
	    <div class="col_cv_alt" data-error="${name}"></div>
	</td>
</#macro>

<#-- 时间控件 -->
<#macro date name placeholder initValue required=false  readOnly=false>
	<td>
	    <input type="text" class="Wdate" name="${name}" value="${initValue}"
	     placeholder="${placeholder}" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})"  <#if readOnly == true>readOnly</#if> />
		<div class="col_cv_alt" data-error="${name}"></div>
	</td>
</#macro>
<#-- 时间控件 \'yyyy-MM-dd HH:mm:ss\' 处理字符串拼接问题 -->
<#macro date2 name placeholder initValue required=false  readOnly=false>
	<td>
	    <input type="text" class="Wdate" name="${name}" value="${initValue}"
	     placeholder="${placeholder}" onClick="WdatePicker({el:this,dateFmt:\'yyyy-MM-dd HH:mm:ss\'})"  <#if readOnly == true>readOnly</#if> />
		<div class="col_cv_alt" data-error="${name}"></div>
	</td>
</#macro>

<#-- 工具列 -->
<#macro toolEdit>
	<td class="center ">
		<a href="#" onclick="save($(this))""><span class="glyphicon glyphicon-saved"></span></a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="#" onclick="remove($(this))"><span class="glyphicon glyphicon-remove"></span></a>
	</td>	
</#macro>